﻿#region Using Statements

#endregion

namespace DirectZZT.Shared.Scripting
{
    /// <summary>
    /// Defines mechanisms for a debuggable script.
    /// This is used by the ScriptDebugger to enable comfortable script debugging.
    /// </summary>
    public interface IDebuggableScript
    {
        /// <summary>
        /// Returns the name of this script that is displayed the debugger.
        /// </summary>
        string DebugName { get; }

        /// <summary>
        /// Breaks execution of this script.
        /// </summary>
        void DebugBreak();
        /// <summary>
        /// Continues execution of a halted script.
        /// </summary>
        void DebugContinue();
        /// <summary>
        /// Enables execution for one line, then immediately breaks execution.
        /// </summary>
        void DebugStep();
        /// <summary>
        /// Restarts the script at the beginning.
        /// </summary>
        void DebugRestart();
        /// <summary>
        /// Attempts to set the line pointer to the given line.
        /// </summary>
        /// <param name="line">The line to set the line pointer to.</param>
        void DebugMoveToLine(int line);
        /// <summary>
        /// Inline-modifies the contents of the given line.
        /// </summary>
        /// <param name="line">The line to modify its contents.</param>
        /// <param name="scriptLine">The contents to place. This mustn't be an empty line, comments are allowed.</param>
        void DebugModifyLineContents(int line, string scriptLine);
    }
}
